/*
* pps_bom
*/
package com.pitop.mould.api;

import com.pitop.mould.entity.MouldMaterial;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 物料模具关联 api请求熔断器
 *
 * @author berton
 */
@FeignClient(value = "pps-cloud-provider", fallback = MouldMaterialFeignApiImpl.class)
public interface MouldMaterialFeignApi {
    /**
     * 查询MouldMaterial一个详情信息
     *
     * @param id
     * @param materialCode 物料编码
     * @param mouldCode    模具编码
     * @return MouldMaterial
     */
    @GetMapping(value = "/mouldMaterial/load")
    MouldMaterial load(@RequestParam("id") Long id, @RequestParam("materialCode") String materialCode, @RequestParam("mouldCode") String mouldCode);

    /**
     * 查询MouldMaterial一个详情信息
     *
     * @param id
     * @param materialCode 物料编码
     * @param mouldCode    模具编码
     * @return MouldMaterial
     */
    @GetMapping(value = "/mouldMaterial/get")
    MouldMaterial get(@RequestParam("id") Long id, @RequestParam("materialCode") String materialCode, @RequestParam("mouldCode") String mouldCode);

    /**
     * 根据条件id查询MouldMaterial一个详情信息
     *
     * @param id
     * @return MouldMaterial
     */
    @GetMapping(value = "/mouldMaterial/load/id/{id}")
    MouldMaterial loadById(@RequestParam("id") Long id);

    /**
     * 根据条件materialCode查询MouldMaterial一个详情信息
     *
     * @param materialCode 物料编码
     * @return MouldMaterial
     */
    @GetMapping(value = "/mouldMaterial/load/materialCode/{materialCode}")
    MouldMaterial loadByMaterialCode(@RequestParam("materialCode") String materialCode);

    /**
     * 根据条件mouldCode查询MouldMaterial一个详情信息
     *
     * @param mouldCode 模具编码
     * @return MouldMaterial
     */
    @GetMapping(value = "/mouldMaterial/load/mouldCode/{mouldCode}")
    MouldMaterial loadByMouldCode(@RequestParam("mouldCode") String mouldCode);

    /**
     * 根据条件id查询MouldMaterial一个详情信息
     *
     * @param id
     * @return MouldMaterial
     */
    @GetMapping(value = "/mouldMaterial/get/id/{id}")
    MouldMaterial getById(@RequestParam("id") Long id);

    /**
     * 根据条件materialCode查询MouldMaterial一个详情信息
     *
     * @param materialCode 物料编码
     * @return MouldMaterial
     */
    @GetMapping(value = "/mouldMaterial/get/materialCode/{materialCode}")
    MouldMaterial getByMaterialCode(@RequestParam("materialCode") String materialCode);

    /**
     * 根据条件mouldCode查询MouldMaterial一个详情信息
     *
     * @param mouldCode 模具编码
     * @return MouldMaterial
     */
    @GetMapping(value = "/mouldMaterial/get/mouldCode/{mouldCode}")
    MouldMaterial getByMouldCode(@RequestParam("mouldCode") String mouldCode);

    /**
     * 删除MouldMaterial
     */
    @DeleteMapping("/mouldMaterial/delete")
    void delete(@RequestParam("id") Long id, @RequestParam("materialCode") String materialCode, @RequestParam("mouldCode") String mouldCode);


    /**
     * 查询MouldMaterial信息集合
     *
     * @return 分页对象
     */
    @PostMapping(value = "/mouldMaterial/list")
    List<MouldMaterial> list(@RequestBody MouldMaterial mouldMaterial, @RequestParam("curPage") int curPage, @RequestParam("pageSize") int pageSize);


    /**
     * 查询MouldMaterial信息集合
     *
     * @return 分页对象
     */
    @GetMapping(value = "/mouldMaterial/list/by")
    List<MouldMaterial> listByPk(@RequestParam("id") Long id, @RequestParam("materialCode") String materialCode, @RequestParam("mouldCode") String mouldCode, @RequestParam("curPage") int curPage, @RequestParam("pageSize") int pageSize);


    /**
     * 统计MouldMaterial信息数量根据主键
     *
     * @return 总条数
     */
    @GetMapping(value = "/mouldMaterial/count/by")
    Integer count(@RequestParam("id") Long id, @RequestParam("materialCode") String materialCode, @RequestParam("mouldCode") String mouldCode);

    /**
     * 统计MouldMaterial信息数量
     *
     * @return 总条数
     */
    @PostMapping(value = "/mouldMaterial/count")
    Integer count(@RequestBody MouldMaterial mouldMaterial);


    /**
     * 创建MouldMaterial
     *
     * @return MouldMaterial
     */
    @PostMapping("/mouldMaterial/build")
    MouldMaterial build(@RequestBody MouldMaterial mouldMaterial);


    /**
     * 修改MouldMaterial
     *
     * @return MouldMaterial
     */
    @PutMapping("/mouldMaterial/modify")
    MouldMaterial modify(@RequestBody MouldMaterial mouldMaterial);


}
